var applyTokenDo = function (func) {
    let options = {
        region: "oss-cn-beijing",
        bucket: "hterobot-image",
        stsToken: "CAIS+gF1q6Ft5B2yfSjIr4mEIfLWm+5b1YGnZnLrtE4EWtlcvonspTz2IHpMdXNoBukXtP83n2lX6fgalqZpTJtIfkHfdsp36LJe9A75uQkXdXvxv9I+k5SANTW5KXyShb3/AYjQSNfaZY3eCTTtnTNyxr3XbCirW0ffX7SClZ9gaKZ8PGD6F00kYu1bPQx/ssQXGGLMPPK2SH7Qj3HXEVBjt3gX6wo9y9zmmZbBtkKP1gyjkr5P/dSoGPX+MZkwZqUYesyuwel7epDG1CNt8BVQ/M909vceoWad5o7EUgMKu07fbLWKqscLNgZ8I7Q3ALIBpeDkhSzSYSd4LkOdGoABLQV0DaB9GnXMqDK93ba4fLY1dZ9Ax+AQaBCMIDtxwHfvxyrwtNe9ICYZJVSgEZEEgBEw0fYoWlbhqd+oD5NqGSFI7bUN1hbhfcDqFdRCeIj9yQrEzzH0qQpgF4bek54Ok4XwuKn3lfNlh/haTrpU7JRDXfDpqpYpOzeoX59Ibjw=",
        accessKeyId: "STS.NJ1jHbv1zbCLdTZPNQVVpQLGG",
        accessKeySecret: "HGLEMBuSJhyB12jQm1C5Nrwhe6B7JRjJYgY5Q8xcyu6Z"
      };
    var client = new OSS(options);
    return func(client);
};

var listFiles = function (client) {
    return client.list({
        'max-keys': 100
    }).then(function (result) {
        console.log(result)
    });
};



    applyTokenDo(listFiles);